package edu.indiana.d2i.job;

import java.util.UUID;

/* describe resources for job */
public class HTRCJobConfig {
	public static enum JOBTYPE{MAPREDUCE, SINGLE};
	
	public JOBTYPE jobtype;
	public String jobID;
	public String userID;
	public String jobFilePath;
	/* format: XXX.jar [propFilePath] [args] */
	public String propFilePath = null;
	public String[] args = null;
	public int numVM = 1;
	
	public HTRCJobConfig(HTRCJobConfig conf) {
		jobID = conf.jobID;
		userID = conf.userID;
		jobFilePath = conf.jobFilePath;
		propFilePath = conf.propFilePath;
		args = conf.args;
		numVM = conf.numVM;
		jobtype = conf.jobtype;
	}
	
	public HTRCJobConfig(String userID, String jobFilePath, String propFilePath, JOBTYPE jobtype) {
		jobID = UUID.randomUUID().toString();
		this.userID = userID;
		this.jobFilePath = jobFilePath;
		this.propFilePath = propFilePath;
		this.jobtype = jobtype;
	}
	
	public void setNumVm(int num) {
		numVM = num;
	}
	
	public void setPropFilePath(String propFilePath) {
		this.propFilePath = propFilePath;
	}
	
	public void setArgs(String argsFilePath) {
//		this.argsFilePath = argsFilePath;
	}
	
	public void setArgs(String[] args) {
		this.args = args;
	}
	
	public void setJobType(JOBTYPE jobtype) {
		this.jobtype = jobtype;
	}
}
